import java.util.ArrayDeque;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.BlockingDeque;
import java.util.concurrent.BlockingQueue;

public class Dem1 {
    public static void main(String[] args) throws InterruptedException {
        BlockingQueue<String> queue=new ArrayBlockingQueue<>(3);//这个参数是阻塞队列的容量
        queue.put("111");
        System.out.println("put成功");
        queue.put("111");
        System.out.println("put成功");
        queue.take();
        System.out.println("take成功");
        queue.take();
        System.out.println("take成功");
        queue.take();
        System.out.println("take成功");

    }
}
